package com.kedacom.demo.springrabbitex;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.springframework.stereotype.Component;

import com.kedacom.demo.springrabbitex.RabbitMessageSender.PendingConfirm;

/**
 * PendingConfirmHolder
 * @author luocanfeng
 * @date 2013-8-20
 */
@Component("pendingConfirmHolder")
public class PendingConfirmHolder {

	private final Map<String, PendingConfirm> confirmHolder = new ConcurrentHashMap<String, PendingConfirm>();

	public void put(String msgTag, PendingConfirm pendingConfirm) {
		confirmHolder.put(msgTag, pendingConfirm);
	}

	public PendingConfirm get(String msgTag) {
		return confirmHolder.get(msgTag);
	}

	public PendingConfirm remove(String msgTag) {
		return confirmHolder.remove(msgTag);
	}

}
